package reflection;

import java.io.Serializable;

/**
 * @program: javase
 * @description:
 * @author: lld
 * @create: 2020-11-22 16:19
 **/
@MyAnnotation("MyAnnotation-Reflect1")
public class Reflect1 implements Serializable {
    static {
        System.out.println("Reflect1初始化块");
    }

    private String name;
    private int age;
    int id;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Reflect1() {
        System.out.println("无参构造方法");
    }

    @Override
    public String toString() {
        return "Reflect1{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public Reflect1(String name, int age) {
        this.name = name;
        this.age = age;
    }
    public void show(){
        System.out.println("show方法");
    }
    private String show1(int age){
        System.out.println("show1方法"+age);
        return "show1方法"+age;
    }
    public static void staticMethod(){
        System.out.println("staticMethod方法");
    }
}
